package com.itcast.bulls.stock.finance.service;

import com.itcast.bulls.stock.common.exception.ComponentException;
import com.itcast.bulls.stock.entity.finance.TradeAccountSettlement;
import com.itcast.bulls.stock.finance.vo.AccountOverviewVo;
import org.springframework.transaction.annotation.Transactional;

import java.util.List;

public interface IStockFinanceService {

    //计算账户总览信息
    AccountOverviewVo calcAccountSummary(long accountId) throws ComponentException;

    //更新账户资金月
    @Transactional(rollbackFor = Exception.class) //回滚异常，针对所有的事务
    long updateBalance(long accountId, long adjustBalance) throws ComponentException;

    //获取账户资金月
    long getBalance(long accountId) throws ComponentException;

    //获取账户交割单数据
    List<TradeAccountSettlement> getTradeAccountSettlements(long accountId, long timeStart, long timeEnd) throws ComponentException;
}
